﻿@model Taskever.Web.Models.AbpErrorInfo
<div class="abp-widget">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">Login Box</h3>
        </div>
        <div class="panel-body">
            <form id="LoginBoxForm" role="form" action="@Url.Action("Login", "AbpAccount")" method="POST">
                <div class="form-group">
                    <input type="email" maxlength="100" name="EmailAddress" class="form-control" id="LoginBoxEmailAddress" placeholder="Enter email" required>
                </div>
                <div class="form-group">
                    <input type="password" maxlength="30" name="Password" class="form-control" id="LoginBoxPassword" placeholder="Password" required>
                </div>
                <div class="checkbox">
                    <label>
                        <input type="checkbox" name="RememberMe">
                        Remember me
                    </label>
                </div>
                <button type="submit" class="btn btn-default">Login</button>
            </form>
        </div>
    </div>
</div>

<style>
    .abp-widget {
        color: red;
    }
</style>

<script>
    define('Taskever/Widgets/LoginBox', ['jquery'], function ($) {

        var ctor = function (instanceId) {
            var self = this;
            self.instanceId = instanceId;

            self.init = function () {
                $(function () {
                    $(self.instanceId + " .login-form").validate({
                        rules: {
                            Password: {
                                minlength: 3
                            }
                        }
                    });
                });
            };
        };

        return ctor;
    });
</script>
